package com.ktjy.mapper.user;

import com.ktjy.pojo.StorageRecord;
import com.ktjy.pojo.Supplier;
import com.ktjy.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface SupplierMapper {

    /**
     * 统计用户数量的方法
     * @return
     */
    public int SupplierCount();

//    public List<Supplier> getSupplierList();

    /**
     * 添加
     * @param supplier
     * @return
     */
    public int add(Supplier supplier);

    /**
     * 修改
     * @param supplier
     * @return
     */
    public int update(Supplier supplier);

    /**
     * 删除
     * @param id
     * @return
     */
    public int delete(@Param("id")Long id);


    /**
     * 查询ch04上机2
     */
    public List<Supplier> getSupplierList(@Param("supCode")String supCode,
                                          @Param("supName")String supName);

    /**
     * 查询ch04上机3
     */
    public List<Supplier> getSupplierSelect(@Param("supName")String supName,
                                            @Param("supCode")String supCode,
                                            @Param("supContact")String supContact,
                                            @Param("createdTime")Date createdTime);

    /**
     * ch04上机6
     * @param supplier
     * @return
     */
    public int updateId(Supplier supplier);

    /**
     * ch04上机7
     * @param supplier
     * @return
     */
    public int updateTrim(Supplier supplier);

    /**
     *分页查询
     */
    public List<Supplier> selectListPage(@Param("pageBegin") Long pageBegin,
                                              @Param("pageSize")Long pageSize);
}
